<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="catalog" tagdir="/WEB-INF/tags/catalog"%>

<%
	/**猎取当前请求的URL标识，*_html的形式，比如order.html，则此菜单的标识为order_html**/	
	String path = request.getServletPath();
	String currPage = null;
	if (path.lastIndexOf("/")!=-1) {
		currPage = path.substring(path.lastIndexOf("/")+1,path.length());
	}else{
	 	currPage = path;
	}
	if(path.indexOf("prod")>-1){
		request.setAttribute("prodCatelogFlag", "1");
	}
	currPage = currPage.replace(".", "_");
	request.setAttribute("currPage", currPage);
	request.setAttribute("currPath", path);
 %>
<div class="nav_wrap clearfix">
	<ul class="nav clearfix"> 
		<li class="first">
			<a href="${ctxPath}/index.html" <c:if test="${(currPage eq 'index_html')}">class="curr"</c:if> ><span><b class="b1"><fmt:message key="eStore.home"/></b></span></a>
			<c:if test="${(currPage eq 'index_html')}"><span class="icon"></span></c:if> 
		</li>
		<li id="productCategoryRoot">
			<catalog:getProductCategory returnCategoryName="productCatelog" categoryCode="mbqgrq">
				<a <catalog:productCategoryLink categoryId="${productCatelog.categoryId}" /> <c:if test="${(currPage eq 'cat2_html')}">class="curr"</c:if>><span>${productCatelog.categoryName}</span></a>
				<c:if test="${prodCatelogFlag eq 1}"><span class="icon"></span></c:if> 
				<catalog:productCategoryTree returnRootCategoryName="catelogs" depth="2" categoryCode="${productCatelog.categoryCode}">
					<ul id="productCategoryRootChildren" style="display: none;">
						<c:forEach items="${catelogs.children}" var="children">
						<li id="${children.categoryCode}ChildrenFeet"><a <catalog:productCategoryLink  categoryId="${children.categoryId}" />>
							<span>${children.categoryName}</span><c:if test="${not empty children.children}"><i class="arr"></i></c:if></a>
							<c:if test="${not empty children.children}">
								<ul id="${children.categoryCode}ChildrenFeetChildren" style="display: none;">
									<c:forEach items="${children.children}" var="children3Feet">
										<li><a <catalog:productCategoryLink categoryId="${children3Feet.categoryId}" /> ><span>${children3Feet.categoryName}</span></a></li>
									</c:forEach>
								</ul>
							</c:if>
						</li>
						</c:forEach>
					</ul>
				</catalog:productCategoryTree>
			</catalog:getProductCategory>
		</li>
		
		<!-- 内容目录 -->
		<li id="courseCatelogRoot">
			<catalog:getContentCategory returnCategoryName="courseCatelog" categoryCode="bszeld">
				<a <catalog:contentCategoryLink category="${courseCatelog}"/> ><span>${courseCatelog.categoryName}</span></a>
				<c:if test="${(currPage eq 'cat51_html')}"><span class="icon"></span></c:if> 
				
				<catalog:contentCategoryTree returnRootCategoryName="courseCatelogRoot" depth="2" categoryCode="bszeld">
					<c:if test="${not empty courseCatelogRoot.children}">
						<ul id="courseCatelogRootChildren" style="display: none;">
							<c:forEach items="${courseCatelogRoot.children}" var="children">
							<li id="${children.categoryCode}ChildrenFeet"><a <catalog:contentCategoryLink categoryId="${children.categoryId}" />>
								<span>${children.categoryName}</span><c:if test="${not empty children.children}"><i class="arr"></i></c:if></a>
								<c:if test="${not empty children.children}">
									<ul id="${children.categoryCode}ChildrenFeetChildren" style="display: none;">
										<c:forEach items="${children.children}" var="children3Feet">
											<li><a <catalog:contentCategoryLink categoryId="${children.categoryId}" />><span>${children3Feet.categoryName}</span></a></li>
										</c:forEach>
									</ul>
								</c:if>
							</li>
							</c:forEach>
						</ul>
					</c:if>
				</catalog:contentCategoryTree>
			</catalog:getContentCategory>
		</li>
		<li id="buyCatelogRoot">
			<catalog:getContentCategory returnCategoryName="buyCatelog" categoryCode="uqdsxq">
				<a <catalog:contentCategoryLink category="${buyCatelog}"/> ><span>${buyCatelog.categoryName}</span></a>
				<c:if test="${(currPage eq 'cat63_html')}"><span class="icon"></span></c:if> 
				
				<catalog:contentCategoryTree returnRootCategoryName="buyCatelogRoot" depth="2" categoryCode="uqdsxq">
					<c:if test="${not empty buyCatelogRoot.children}">
						<ul id="buyCatelogRootChildren" style="display: none;">
							<c:forEach items="${buyCatelogRoot.children}" var="children">
							<li id="${children.categoryCode}ChildrenFeet"><a <catalog:contentCategoryLink categoryId="${children.categoryId}" />>
								<span>${children.categoryName}</span><c:if test="${not empty children.children}"><i class="arr"></i></c:if></a>
								<c:if test="${not empty children.children}">
									<ul id="${children.categoryCode}ChildrenFeetChildren" style="display: none;">
										<c:forEach items="${children.children}" var="children3Feet">
											<li><a <catalog:contentCategoryLink categoryId="${children.categoryId}" />><span>${children3Feet.categoryName}</span></a></li>
										</c:forEach>
									</ul>
								</c:if>
							</li>
							</c:forEach>
						</ul>
					</c:if>
				</catalog:contentCategoryTree>
			</catalog:getContentCategory>
		</li>
		<li id="activeCatelogRoot">
			<catalog:getContentCategory returnCategoryName="activeCatelog" categoryCode="lbfgen">
				<a <catalog:contentCategoryLink category="${activeCatelog}"/> ><span>${activeCatelog.categoryName}</span></a>
				<c:if test="${(currPage eq 'cat57_html')}"><span class="icon"></span></c:if> 
				
				<catalog:contentCategoryTree returnRootCategoryName="activeCatelogRoot" depth="2" categoryCode="lbfgen">
					<c:if test="${not empty activeCatelogRoot.children}">
						<ul id="activeCatelogRootChildren" style="display: none;">
							<c:forEach items="${activeCatelogRoot.children}" var="children">
							<li id="${children.categoryCode}ChildrenFeet"><a <catalog:contentCategoryLink categoryId="${children.categoryId}" />>
								<span>${children.categoryName}</span><c:if test="${not empty children.children}"><i class="arr"></i></c:if></a>
								<c:if test="${not empty children.children}">
									<ul id="${children.categoryCode}ChildrenFeetChildren" style="display: none;">
										<c:forEach items="${children.children}" var="children3Feet">
											<li><a <catalog:contentCategoryLink categoryId="${children.categoryId}" />><span>${children3Feet.categoryName}</span></a></li>
										</c:forEach>
									</ul>
								</c:if>
							</li>
							</c:forEach>
						</ul>
					</c:if>
				</catalog:contentCategoryTree>
			</catalog:getContentCategory>
		</li>
		<li id="aboutCatelogRoot">
			<catalog:getContentCategory returnCategoryName="aboutCatelog" categoryCode="kfakeq">
				<a <catalog:contentCategoryLink category="${aboutCatelog}"/> ><span>${aboutCatelog.categoryName}</span></a>
				<c:if test="${(currPage eq 'cat60_html')}"><span class="icon"></span></c:if> 
				
				<catalog:contentCategoryTree returnRootCategoryName="aboutCatelogRoot" depth="2" categoryCode="kfakeq">
					<c:if test="${not empty aboutCatelogRoot.children}">
						<ul id="aboutCatelogRootChildren" style="display: none;">
							<c:forEach items="${aboutCatelogRoot.children}" var="children">
							<li id="${children.categoryCode}ChildrenFeet"><a <catalog:contentCategoryLink categoryId="${children.categoryId}" />>
								<span>${children.categoryName}</span><c:if test="${not empty children.children}"><i class="arr"></i></c:if></a>
								<c:if test="${not empty children.children}">
									<ul id="${children.categoryCode}ChildrenFeetChildren" style="display: none;">
										<c:forEach items="${children.children}" var="children3Feet">
											<li><a <catalog:contentCategoryLink categoryId="${children.categoryId}" />><span>${children3Feet.categoryName}</span></a></li>
										</c:forEach>
									</ul>
								</c:if>
							</li>
							</c:forEach>
						</ul>
					</c:if>
				</catalog:contentCategoryTree>
			</catalog:getContentCategory>
		</li>
		<li id="lxCatelogRoot">
			<catalog:getContentCategory returnCategoryName="lxCatelog" categoryCode="fynzet">
				<a <catalog:contentCategoryLink category="${lxCatelog}"/> ><span>${lxCatelog.categoryName}</span></a>
				<c:if test="${(currPage eq 'cat66_html')}"><span class="icon"></span></c:if> 
				
				<catalog:contentCategoryTree returnRootCategoryName="lxCatelogRoot" depth="2" categoryCode="fynzet">
					<c:if test="${not empty lxCatelogRoot.children}">
						<ul id="lxCatelogRootChildren" style="display: none;">
							<c:forEach items="${lxCatelogRoot.children}" var="children">
							<li id="${children.categoryCode}ChildrenFeet"><a <catalog:contentCategoryLink categoryId="${children.categoryId}" />>
								<span>${children.categoryName}</span><c:if test="${not empty children.children}"><i class="arr"></i></c:if></a>
								<c:if test="${not empty children.children}">
									<ul id="${children.categoryCode}ChildrenFeetChildren" style="display: none;">
										<c:forEach items="${children.children}" var="children3Feet">
											<li><a <catalog:contentCategoryLink categoryId="${children.categoryId}" />><span>${children3Feet.categoryName}</span></a></li>
										</c:forEach>
									</ul>
								</c:if>
							</li>
							</c:forEach>
						</ul>
					</c:if>
				</catalog:contentCategoryTree>
			</catalog:getContentCategory>
		</li>
	</ul>
</div>
<script type="text/javascript">
<!--
$j(document).ready(function(){
	$j("[id$='Root']").each(function(){
		var id = this.id+"Children";
		$j(this).hover(
			function(){$j('#'+id).show();},
			function(){$j('#'+id).hide();}
		);
	});
	
	$j("[id$='Feet']").each(function(){
		var id = this.id+"Children";
		$j(this).hover(
			function(){$j('#'+id).show();},
			function(){$j('#'+id).hide();}
		);
	});
});
//-->
</script>
